<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>js基本语法</title>
		<script type="text/javascript" language="JavaScript">
			function test01(){
				/*
				 * 转换函数：
				 * paseInt
				 * paseFlot
				 * Number()
				 */
				// 定义一个变量
				var strVal1 = "a100HelloWorld!";
				var strVal2 = "3.14";
				alert("strVal1 ="+parseInt(strVal1));
				alert("strVal2 ="+parseInt(strVal2));
				alert("strVal2 ="+Number(strVal2));
			}
			
			
		</script>
		
	</head>
	<body>
		<input type="button" value="转换函数" onclick="test01();">
	</body>
</html>
